home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-02-10 | 1.3 KB | 69 lines | [TEXT/MSBB] |
- ' Professor Mac's Movie Demo
- ' ©MacTutor 1987
- ' By Dave Kelly
- ' Requires CLR VWLib (VideoWorks not required)
- ' with optional support for CLR SpeechLib
-
- CLEAR, 30000!
- false=0:true=NOT false
- LIBRARY"XP™ 40-6:Software Dev:MS Basic:VWlib"
- ON ERROR GOTO 10
- SpeechStatus=true
- LIBRARY "XP™ 40-6:Software Dev:MS Basic:SpeechLib"
- ON ERROR GOTO 0
- IF SpeechStatus=true THEN
- SpeechHand!=0!
- SpeechErr%=0
- Phon$=""
- SpeechOn "",SpeechHand!,SpeechErr%
- ReaderString SpeechHand!,"Hello",Phon$,SpeechErr%
- END IF
-
- DIM A%(300)
- refnum%=0
- done%=0
- movie$="XP™ 40-6:Mar Issue:Basic Mar87:Professor Mac Movie"
- CLS
- ON ERROR GOTO 20
- vwopen movie$,0,0,refnum%
- ON ERROR GOTO 0
- ON TIMER (4) GOSUB Wait1
- TIMER ON
- advance:
- vwanimate refnum%,done%
- IF done%=0 THEN advance
- done:
- IF SpeechStatus=true THEN SpeechOff SpeechHand!
- vwclose refnum%
- INITCURSOR
-
- END
- Wait1:
- TIMER OFF
- IF SpeechStatus=true THEN GOSUB Speak
- ON TIMER(13) GOSUB Wait2
- TIMER ON
- RETURN
- Wait2:
- IF SpeechStatus=true THEN GOSUB Speak
- TIMER OFF
- RETURN
-
- Speak:
-
- GET (15,15)-(85,55),A%
- SoundOutString SpeechHand!,Phon$,SpeechErr%
- PUT (15,15),A%,PSET
- HIDECURSOR
- ReaderString SpeechHand!,"Welcome to MacTutor",Phon$,SpeechErr%
- RETURN
-
- 10 NoSpeech:
- IF ERR=53 THEN SpeechStatus=false
- RESUME NEXT
- 20 NoMovie:
- movie$=FILES$(1,"VWSCVWZP")
- IF movie$="" THEN END
- vwopen movie$,0,0,refnum%
- RESUME NEXT
-